# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=at-spi2-core
pkgver=2.36.0
pkgrel=1
pkgdesc="Protocol definitions and daemon for D-Bus at-spi"
url="https://www.freedesktop.org/wiki/Accessibility/AT-SPI2/"
arch="all"
options="!check"  # Requires running dbus daemon.
license="LGPL-2.0-or-later"
makedepends="libxtst-dev dbus-dev glib-dev gobject-introspection-dev gtk-doc meson"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/at-spi2-core/${pkgver%.*}/at-spi2-core-$pkgver.tar.xz"

build() {
	meson \
		--buildtype=plain \
		--prefix=/usr \
		-Dx11=yes \
		-Dintrospection=yes \
		-Ddocs=true \
		-Ddbus_daemon=/usr/bin/dbus-daemon \
		. build
	ninja -C build
}

package() {
	DESTDIR="$pkgdir" ninja -C build install
	rm -rf "$pkgdir"/usr/lib/systemd
}

sha512sums="f45d7e68bfcd9b93cebc47e30febce1ae6a4d9df2fbc9d5bdc25babb123c922d0f9a229485770b2f6ed386178144c20486fa3e46195041ea65a54ab019b1cbb6  at-spi2-core-2.36.0.tar.xz"
